<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;

class CreateUserNickNameTable extends Migration
{
    public function up(): void
    {
        Schema::create('nick_name_pool', function (Blueprint $table) {
            $table->integerIncrements('id');
            $table->tinyInteger('gender')->default(-1)->comment('昵称性别');
            $table->char('type', 8)->default('')->comment('昵称前缀');
            $table->string('content', 30)->default('')->comment('昵称后缀');
            $table->timestamps();
            $table->tinyInteger('flag')->default(1)->comment('记录状态');
        });
    }

    public function down(): void
    {
        Schema::dropIfExists('user_nick_name');
    }
}
